<include file="Public:head" title='短信群发' />
<script src="__PUBLIC__/js/Jquery/validate.js"></script>
<script>
    function checkTextarea(v) {
        var len = v.length;
        $('#count').text(len);
    }
    function checkForm() {
        var phones = $("textarea[name=phones]").val();
        phones = phones.split("\n");
        var pattern = /^1[3,5,8]\d{9}$/;
        var is_true = true;
        for (var i = 0; i < phones.length; i++) {
            if (phones[i] != '') {
                if (pattern.test(phones[i]) == false) {
                    is_true = false;
                    alert(phones[i] + " 不是正确的手机号码格式");
                    return false;
                }
            }
        }

        return is_true;
    }
</script>
<div class="main-container" id="main-container">
    <div class="main-container-inner">
        <include file="Public:left" />
        <div class="main-content">
            <div class="breadcrumbs" id="breadcrumbs">
                <ul class="breadcrumb">
                    <li><i class="icon-home home-icon"></i><a href="__APP__/{$Think.MODULE_NAME}">首页</a></li>
                    <li><a href="{:U('Communications/shorts')}">短信管理</a></li>
                    <li class="active">短信群发</li>
                </ul>
            </div>
            <div class="page-content">
                <div class="row">
                    <div class="col-xs-12">
                        <div class="row">
                            <div class="col-xs-12">
                                <h3 class="header smaller lighter blue">短信群发</h3>

                                <form action="{:U('Communications/shorts_more_post')}" method="POST" id="form">
                                    <table class="table table_detail">
                                        <tbody>

                                            <tr>
                                                <td class="td_left">手机号码列表:</td>
                                                <td>
                                                    <textarea  name="phones" style="width:410px;height:250px;" maxlength="1000" autocomplete="off"></textarea>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td class="td_left">发送内容:</td>
                                                <td>
                                                    <textarea  name="content" style="width:410px;height:150px;" onkeyup="checkTextarea(this.value)" maxlength="1000" autocomplete="off"></textarea>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td class="td_left"></td>
                                                <td>
                                                    输入了【<strong id="count"class="red">0</strong>】个字符 ,移动通道为66字/条,内容被分割成1条短信;联通通道为70字/条,内容被分割成1条短信;电信通道为66字/条,内容被分割成1条短信;
                                                </td>
                                            </tr>
                                            <tr>
                                                <td class="td_left"></td>
                                                <td>
                                                    <button class="btn btn-info btn-sm" type="submit">
                                                        <i class="icon-ok bigger-110 "></i>
                                                        保 存
                                                    </button>
                                                </td>
                                            </tr>
                                        </tbody>
                                    </table>
                                </form>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <include file="Public:setting" />
    </div>
</div>
<include file="Public:foot" />